<ion-view>
  <ion-header-bar class="bar bar-header header">
    <button on-touch="goback()" class="button return-btn">返回</button>
    <label class="item-input-wrapper hd-find-box">
      <i class="icon hd-find-icon"></i>
      <input type="search" ng-model="searchKey" class="hd-find-text" placeholder="请输入关键字搜索酒款">
    </label>
    <button class="button hd-red-btn" on-touch="search()">搜索</button>
  </ion-header-bar>
  <div class="bar bar-subheader gray-bg">
    <div class="tabs tads-nav" ng-if="wineList.length!=0">
      <a on-touch="changePrice()" class="tab-item" ng-class="{'active':showWhich[0]}">{{priceTip}}<i ng-class="{'select-icon-more':showMoreIcon[0],'select-icon-less':!showMoreIcon[0]}"></i></a>
      <a on-touch="changeComment()" class="tab-item" ng-class="{'active':showWhich[1]}">{{commentTip}}<i ng-class="{'select-icon-more':showMoreIcon[1],'select-icon-less':!showMoreIcon[1]}"></i></a>
      <a on-touch="changeCollect()" class="tab-item" ng-class="{'active':showWhich[2]}">{{collectTip}}<i ng-class="{'select-icon-more':showMoreIcon[2],'select-icon-less':!showMoreIcon[2]}"></i></a>
    </div>
  </div>
  <!--style="top:72px"   tads-select-->
    <ion-content class="gray-bg" has-bouncing="true" ng-class="{'has-footer':wineList.length!=0,'has-subheader':wineList.length!=0}">
      <div ng-if='wineList.length!=0'>
    <div class="search-tips">
        共搜到 <em class="mlr5 purple" ng-bind="wineListCount"></em>条记录
    </div>
        <div class="list">
            <ul>
              <li class="item myitem-checkbox product-item" ng-repeat="item in wineList">
                <label class="mycheckbox" on-touch="selectWine($index)">
                  <em class="product-item-checkbox" ng-class="{'active':item.selected}">
                    <input type="checkbox"/>
                  </em>
                </label>
                <a ng-href="#/winedetails/{{item.wine_id}}" class="item item-thumbnail-left product-item-list">
                  <div class="product-item-pic"><img ng-src="{{picPath}}{{item.wine_img_url}}" alt=""/></div>
                  <h3 ng-bind="item.wine_cn_name"></h3>
                  <p class="product-item-eng" ng-bind="item.wine_en_name"></p>
                  <p class="product-item-from">{{item.country_cn_name}}<span ng-if="item.wine_year&&item.wine_year!=''&&item.wine_year!='+'&&item.wine_year!='﹢'&&item.wine_year!='NV'">，{{item.wine_year}}</span></p>
                  <p>参考价：<em class="product-item-money">¥ {{getFormatNum(item.wine_price)}}<span class="product-money-tips">仅供参考</span></em></p>
                </a>
              </li>
            </ul>
        </div>
      </div>
      <div class="search-on-hover" ng-if="wineListCount==0">
        <i class="search-on-icon"></i>
        <em class="search-on-txt">没有找到相关的酒款</em>
      </div>
      <ion-infinite-scroll
        on-infinite="loadMore()" ng-if="(hasNextPage()||detailSearchHasNextPage())&&wineList.length>0"
        distance="1%"></ion-infinite-scroll>
    </ion-content>

    <div class="bar bar-footer footer-txt footer-white" ng-if='wineList.length!=0'>
        <label class="mt5" style="width:60px" on-touch="selectAllBottom()">
            <em class="footer-checkbox" ng-class="{'active':bottomCheckBoxSelected}">
                <input type="checkbox"/>
            </em>
            全选
        </label>
        <span class="mlr10">已选择<em class="product-fix-num" ng-bind="selectWineCount" style="color:#970b34;">0</em>款酒</span>
      <span class="absolute-right" style="width:141px">
        <button class="button button-small claret-red-btn" type="button" on-touch="addToWineRecommend()">加入酒单</button>
        <button class="button button-small claret-red-btn" type="button" on-touch="createRecommendWine()">生成酒单</button>
      </span>
        <!--<button class="button button-small pull-right claret-red-btn" type="button" on-touch="addToWineRecommend()">加入酒单</button>-->
    </div>

</ion-view>
